//
//  MYShopSalesOrderRightBtnCell.swift
//  MuYing
//
//  Created by tbb on 2019/7/30.
//  Copyright © 2019 TBB. All rights reserved.
//

import UIKit

class MYShopSalesOrderRightBtnCell: MYShopSalesOrderBaseTextCell {
    @objc lazy var rightBtn: QMUIButton = {
        let rightBtn = QMUIButton(type: .custom);
        rightBtn.imagePosition = .right;
        rightBtn.spacingBetweenImageAndTitle = 8;
        rightBtn.titleLabel?.font = UIFont.systemFont(ofSize: 14, weight: .medium);
        rightBtn.setTitleColor(UIColorFromHex(rgbValue: 0xA0A0A0), for: .normal);
        rightBtn.setImage(UIImage(named: "coupon_normal"), for: .normal);
        rightBtn.setImage(UIImage(named: "coupon_select"), for: .selected);
        
//        rightBtn.addTarget(self, action: #selector(rightBtnAction(_:)), for: .touchUpInside)
        return rightBtn;
    }()

//    @objc func rightBtnAction(_ sender:UIButton) {
//        sender.isSelected = !sender.isSelected
//    }
    
    override func layoutSubviews() {
        super.layoutSubviews();
        self.contentView.addSubview(self.rightBtn);
        self.rightBtn.mas_makeConstraints { (make) in
            make?.centerY.mas_equalTo()(0);
            make?.right.mas_equalTo()(-12);
            make?.height.mas_equalTo()(20);
        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
